package cn.com.headfree.call;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.gta.edu.sdk.common.dto.Page;

import cn.com.headfree.base.controller.ResultData;
import cn.com.headfree.vo.workflow.ProcessListVo;
import cn.com.headfree.workflowant.dto.ApproveWorkFlowDto;
import net.sf.json.JSONArray;

@FeignClient(url = "${decisionEngine.url}",name="engine")
@Service("humanManageWorkFlowServerCall")
public interface IHumanManageWorkFlowServerCall {

	@RequestMapping(value = "/human-manage/workFlowAnt/approveWorkFlowDing", method = RequestMethod.POST)
	public ResultData approveWorkFlowDing(@RequestBody ApproveWorkFlowDto flowDto,@RequestParam("iscUserId") String iscUserId,@RequestParam("fax") String fax,@RequestParam("userName") String userName);

	@RequestMapping(value = "/human-manage/workFlowAnt/getWorkFlowUnits", method = RequestMethod.POST)
	public JSONArray getWorkFlowUnits();

	@RequestMapping(value = "/human-manage/workFlowAnt/getMouldInfoList", method = RequestMethod.POST)
	public JSONArray getMouldInfoList();

	@RequestMapping(value = "/human-manage/workFlowAnt/getMouldsOfUserDing", method = RequestMethod.POST)
	public ResultData getMouldsOfUserDing(@RequestBody ProcessListVo process);

	@RequestMapping(value = "/human-manage/workFlowAnt/getWorkFlowTemplates", method = RequestMethod.POST)
	public JSONArray getWorkFlowTemplates();

	@RequestMapping(value = "/human-manage/workFlowAnt/getWaitApproveWorkFlowsDing", method = RequestMethod.POST)
	public ResultData getWaitApproveWorkFlowsDing(@RequestParam("pageNo") int pageNo,@RequestParam("pageSize") int pageSize,@RequestParam("iscUserId") String iscUserId,@RequestParam("iscBaseOrgId") String iscBaseOrgId,@RequestBody ApproveWorkFlowDto approveWorkFlowDto);

	@RequestMapping(value = "/human-manage/workFlowAnt/getDoneApproveWorkFlowsDing", method = RequestMethod.POST)
	public ResultData getDoneApproveWorkFlowsDing(@RequestParam("pageNo") int pageNo,@RequestParam("pageSize") int pageSize,@RequestParam("iscUserId") String iscUserId,@RequestParam("iscBaseOrgId") String iscBaseOrgId,@RequestBody ApproveWorkFlowDto approveWorkFlowDto);

	@RequestMapping(value = "/human-manage/workFlowAnt/getNextWorkFlowConditionsDing", method = RequestMethod.POST)
	public ResultData getNextWorkFlowConditionsDing(@RequestParam("approveId") String approveId);

	@RequestMapping(value = "/human-manage/workFlowAnt/approveProcessPageDing", method = RequestMethod.POST)
	public ResultData approveProcessPageDing(@RequestParam("pageNo") int pageNo,@RequestParam("pageSize") int pageSize,@RequestParam("iscUserId") String iscUserId,@RequestParam("iscBaseOrgId") String iscBaseOrgId,@RequestBody ProcessListVo process);

	@RequestMapping(value = "/human-manage/workFlowAnt/findApprovedRecordDing", method = RequestMethod.POST)
	public ResultData findApprovedRecordDing(@RequestParam("businessId") String businessId);

	@RequestMapping(value = "/human-manage/workFlowAnt/deleteBusinessDing", method = RequestMethod.POST)
	public ResultData deleteBusinessDing(@RequestBody ProcessListVo process,@RequestParam("userName") String userName,@RequestParam("fax") String fax,@RequestParam("iscUserId") String iscUserId);

//	@RequestMapping(value = "/human-manage/commonMenu/findUserResourceByInterface/{resId}/{userId}/{code}", method = RequestMethod.GET)
//	public ResultData findUserResourceByInterface(@PathVariable("resId") @RequestParam(required = true) String resId,@PathVariable("userId") @RequestParam(required = true) String userId,@PathVariable("code") @RequestParam(required = true) String code);
@RequestMapping(value = "/human-manage/commonMenu/findUserResourceByInterface/{resId}/{userId}/{code}", method = RequestMethod.GET)
public ResultData findUserResourceByInterface(@PathVariable("resId") String resId,@PathVariable("userId") String userId,@PathVariable("code") String code);

}
